IOCTL$ Function ---------------------------------------------------------------------------- Action Returns current status information from a device driver. Syntax IOCTL$(# filenumber%) Remarks The argument filenumber% is the BASIC file number used to open the device. The IOCTL$ function is most frequently used to test whether an IOCTL statement succeeded or failed, or to obtain current status information. You can use IOCTL$ to ask a communications device to return the current baud rate, information on the last error, logical line width, and so on. The exact information returned depends on the specific device driver. See the device driver documentation to find out what status information the device driver can send. The IOCTL$ function works only if all of the following conditions are met. - The device driver is installed. - The device driver states that it processes IOCTL strings. See the documentation for the driver. - BASIC performed an OPEN operation on a file on that device, and the file is still open. Most standard DOS device drivers do not process IOCTL strings, and you must determine whether the specific driver accepts the command. If the driver does not process IOCTL strings, BASIC generates the error message Illegal function call. Note BASIC devices (LPT n, COM n, SCRN, CONS, PIPE) and DOS block devices (A through Z) do not support IOCTL. The IOCTL statement is not available in OS-2 protected mode. However, you can achieve the same effect by directly invoking the DosDevIOCtl OS-2 functions. See Also